<template>
	<view class="row-category">
		<view class="item" v-for="(item, index) in adList" :key="index" :style="'width:'+width"  @tap="checkType(item)">
			<view class="icon">
				<image lazy-load="true" :src="item.app_image"></image>
			</view>
			<view class="name">{{item.name}}</view>
		</view>
	</view>
</template>

<script>
	import { checkAdType } from '../common/base.js';
	export default {
		data() {
			return {
				
			};
		},
		props: ['adList', 'width'],
		methods: {
			//检查广告类型
			checkType: function(item) {
				checkAdType(item);
			}
		}
	}
</script>

<style>

	.row-category{
		background: #fff;
		width: 750upx;
		display: flex;
		flex-wrap: wrap;
		padding-top:20upx;
	}
	
	.row-category .item{
		width: 150upx;
		display: flex;
		flex-direction: column;
		text-align: center;
		justify-content: center;
		padding-bottom: 20upx;
	}
	
	.row-category .item .icon{
		padding-bottom: 16upx 0;
		justify-content: center;
	}
	
	.row-category .item image{
		width: 100upx;
		height: 100upx;
	}
	
	.row-category .item .name{
		font-size: 24upx;
		color: #666;
		justify-content: center;
	}
</style>
